package com.maomao.config;


import com.maomao.template.service.UserService;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 *
 * @author admin
 * @date 2018/4/12
 */
@Component
public class TestInitializingBean implements InitializingBean {
    private static org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestInitializingBean.class);

    @Autowired
    private UserService userSerivce;
    @Override
    public void afterPropertiesSet() throws Exception {
        logger.info("======user initCache start=======");
        userSerivce.reloadUsers();
        logger.info("======user initCache end=======");
    }
}
